Region Logic: local reasoning for Java programs and its automation

نویسندگان

  • Stan Rosenberg
  • David A. Naumann
  • Charles L. Suffel
چکیده

Shared mutable objects are a cornerstone of the object-oriented paradigm. The ability to share mutable data eliminates unnecessary cloning and gives rise to efficient data structures. Yet, formal reasoning about partial correctness of object-oriented programs is notoriously difficult due to the very same features, viz., sharing and mutable objects. The core problem is aliasing, and one of the contributions of this thesis is a program logic designed to control aliasing through explicit use of effects and disjointedness assertions. We propose a straightforward adaptation of Hoare logic to reason about (sequential) Java programs. The logic employs regions (sets of references) in a novel way, by using them in ghost state, effects and assertions. The aptly named—region logic—embodies “local reasoning” as witnessed by separation logic, without resorting to non-standard semantics or higher-order constructs. Region logic is formalized (and proven sound) with respect to a core subset of Java. Several illustrative examples including subject/observer and composite design patterns are specified and proven partially correct. The assertion language of region logic subsumes boolean algebra and includes (function) image expressions. Full assertion language is quite expressive, e.g., assertions can be quantified, however, its restriction to quantifier-free (QF) assertions yields a decidable theory. Our thesis maintains that the logic is amenable to automation. To that end we implement an automated verifier for region logic; the verifier computes verification conditions which are first-order formulas. The verifier is used to specify and verify a suite of programs including those aforementioned. We also study, i.e., formalize and prove correct, decision procedures for QF assertions. We implement a semi-decision procedure integrated with a (satisfiability modulo theories) solver. To test its feasibility, we compare the implementation with an axiomatization based on quantified formulas; preliminary results are very encouraging. For a restricted language, we give an NP-complete decision procedure and prove its correctness. Author: Stan Rosenberg Advisor: David A. Naumann Date: June 27, 2011 Department: Computer Science Degree: Doctor of Philosophy

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Logic for Information Flow Analysis of Pointer Programs

This paper specifies a nontermination-insensitive, interprocedural, information flow analysis for objectoriented programs via a Hoare-like logic. Pointer aliasing is ubiquitous in such programs, and can potentially leak confidential information. Therefore, assertions in the logic not only describe the noninterference property that formalizes confidentiality, but also describe aliasing propertie...

متن کامل

Weakest Precondition Semantics for OO Programs: A Separation Logic Approach

For the object oriented paradigm, providing a relatively rich model language equipped with formal semantics for practical reasoning is an important and long-standing open problem. In this work, μJava, a sufficient large subset of sequential Java is defined. An OO Separation Logic with pure reference semantic model is developed. Facilitated by this logic, the Weakest Precondition (WP) semantics ...

متن کامل

Local Reasoning and Information Hiding in SCAP

Separation logic supports state-modular program verification in two aspects: local reasoning by means of the ordinary (first-order) frame rule and information hiding by the hypothetical frame rule (a second-order frame rule). In this paper, we show the support of local reasoning and information hiding in SCAP, a program logic for low-level programs with stack-based control abstractions. We show...

متن کامل

The DLV Java Wrapper

Disjunctive logic programs are a powerful tool in knowledge representation and commonsense reasoning. The recent development of an efficient disjunctive logic programming engine, named DLV, allows to exploit disjunctive logic programs for solving complex problems. However, disjunctive logic programming systems are currently missing any interface supporting the integration between commonly used ...

متن کامل

A Java Wrapper for DLV

Disjunctive logic programs are a powerful tool in knowledge representation and commonsense reasoning. The recent development of an efficient disjunctive logic programming engine, named DLV, allows to exploit disjunctive logic programs for solving complex problems. However, disjunctive logic programming systems are currently missing any interface supporting the integration between commonly used ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011